<template>
	<view>
		<view class="c-box" id="personInfo">
		   <view class="personal">
		        <view class="img">
		            <image class="touxiang" :src="currentUser.portrait" v-if="currentUser.portrait"/>
		            <image class="touxiang" src="/static/image/wutouxiang.png" v-else/>
		            <image class="icon" src="https://m.nocexpo.com/statics/js/modules/h5/img/img14.png"/>
		        </view>
		        <view class="dl">
		            <view class="dd">
		                <view class="dd-span">公司</view>
		                <input type="text" v-model="currentUser.company" readonly/>
		            </view>
		            <view class="dd">
		                <view class="dd-span">昵称</view>
		                <input type="text" v-model="currentUser.userName" readonly/>
		            </view>
		            <view class="dd">
		                <view class="dd-span">姓名</view>
		                <input type="text" v-model="currentUser.nickName" readonly/>
		            </view>
		            <view class="dd">
		                <view class="dd-span">职位</view>
		                <input type="text" v-model="currentUser.position" readonly/>
		            </view>
		            <view class="dd">
		                <view class="dd-span">个性签名</view>
		                <input type="text" v-model="currentUser.personSign" readonly/>
		            </view>

		        </view>
		        <view class="c-h98" style="height: 2rem"></view>
		    </view>
		</view>
	</view>
</template>

<script>
import commonApi from '@/utils/commonMethod.js';
export default {
	
	data() {
		return {
			 currentUser: {},
		}
	},
	async mounted() {
		await this.getCurrentUser();
	},
	methods: {
		getCurrentUser(){
			commonApi.currentUserAxios().then(res =>{
				this.currentUser = res.data.session_user_h5;
			});
		},
	}
}
</script>

<style>
	.personal .img {
	    width: 150rpx;
	    height: 150rpx;
	    margin: 30rpx auto;
	    position: relative;
	}
	.personal .img .touxiang{
	    width: 100%;
	    height: 100%;
	    border-radius: 50%;
	    overflow: hidden;
	}
	
	.personal .img .icon {
		width: 40rpx;
		height: 40rpx;
		position: absolute;
		bottom: 0;
		right: 0;
		z-index: 1;
	}
	.personal .dl {
		padding: 0 35rpx;
	}
	.personal .dd {
		height: 80rpx;
		border-bottom: 1px solid #ebebeb;
		line-height: 80rpx;
		display: flex;
		justify-content: space-between;
	}
	.personal .dd .dd-span {
		flex-shrink: 0;
		width: 115rpx;
		text-align: right;
		margin-right: 55rpx;
		color: #1a1a1a;
		font-size: 28rpx;
	}
	.personal .dd input {
		width: 100%;
		flex-shrink: 1;
		border: 0;
		height: 75rpx;
		font-size: 28rpx;
	}
</style>